#include <iostream>
using namespace std;

class T{
	const int & a; // const reference: can not change the value via a
		public:
	T(const int& i) : a(i){
		cout << a << endl;
	}
	
	friend void printT(const T& t){
		cout << t.a << endl;
	}

};

int main () {
		T t1(1), t2(2);
		int i=5;
		T t3(i);
		i=6;
		printT(t3);
		int & ri=i;
		// int q;
		ri=7;
		printT(t3);
		return 0;
}
